using System;
using System.Collections.Generic;
using System.Text;

namespace Objects
{
    public class MauThe
    {
        #region MauThe variables

        private int _Id;
        private String _TenMauThe;
        private String _DuongDan;
        private String _GhiChu;
        private int _Status;
        private int _SapXep;

        private int _IdChuDe;

        #endregion

        #region MauThe properties

        public int Id
        {
            get { return _Id; }
            set { _Id = value; }
        }

        public String TenMauThe
        {
            get { return _TenMauThe; }
            set { _TenMauThe = value; }
        }

        public String DuongDan
        {
            get { return _DuongDan; }
            set { _DuongDan = value; }
        }

        public String GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }


        public int Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        public int SapXep
        {
            get { return _SapXep; }
            set { _SapXep = value; }
        }

        public int IdChuDe
        {
            get { return _IdChuDe; }
            set { _IdChuDe = value; }
        }

        #endregion

        #region IPopulatable<MauThe> Members

        public MauThe Populate(System.Data.DataRow reader)
        {
            MauThe item = new MauThe();

            try { item.Id = Convert.ToInt32(reader["Id"].ToString()); }
            catch { item.Id = -1; }

            item.TenMauThe = Convert.ToString(reader["TenMauThe"].ToString());
            item.DuongDan = Convert.ToString(reader["DuongDan"].ToString());
            item.GhiChu = Convert.ToString(reader["GhiChu"].ToString());
            item.Status = Convert.ToInt32(reader["Status"].ToString());
            item.SapXep = Convert.ToInt32(reader["SapXep"].ToString());

            try { item.IdChuDe = Convert.ToInt32(reader["IdChuDe"].ToString()); }
            catch { item.IdChuDe = -1; }

            return item;
        }

        #endregion
    }
}
